[campsite-dev] article attachment file name/url discrepancy
  • Hi,

    Is it me, or is there a discrepancy between the article attachment's file
    name and what its URL is when downloaded?

    What I've noticed is that a file's original name is lost when it's
    uploaded, and what shows up as its url is something like:

    http:///attachment/000000003.pdf

    Wouldn't it make more sense to keep the original file name as it is?


    doug

    =============================================
    Media Development Loan Fund
    =============================================
    Douglas Arellanes
    Head of Research and Development
    Center for Advanced Media--Prague (CAMP)
    Na vinicnich horach 24a/1834, 160 00 Prague 6
    Czech Republic
    Tel: + 420 2 3333 5356, Fax: +420 2 2431 5419
    Mobile: +420 724 073 364
    http://www.mdlf-camp.net
    http://www.campware.org
    =============================================
    http://www.mdlf.org
    =============================================
  • 3 Comments sorted by
  • Another discrepancy I've found may be due to bad templating, so take it
    with a grain of salt:

    This snippet of template code:









    returns this URI: http:///attachment/0000000-1.

    Which is incorrect.

    The template snippet below it, which should be referring to the same
    article, returns a different (correct) URI:


    ATTACHMENTS


    The following files are available for download:



    description>: KB ( ArticleAttachment Extension>)






    The output of the directive below is:

    http:///attachment/000000003.pdf


    My question is, is this my own (admittedly) bad templating, or is this a
    bug?


    doug




    =============================================
    Media Development Loan Fund
    =============================================
    Douglas Arellanes
    Head of Research and Development
    Center for Advanced Media--Prague (CAMP)
    Na vinicnich horach 24a/1834, 160 00 Prague 6
    Czech Republic
    Tel: + 420 2 3333 5356, Fax: +420 2 2431 5419
    Mobile: +420 724 073 364
    http://www.mdlf-camp.net
    http://www.campware.org
    =============================================
    http://www.mdlf.org
    =============================================




    Douglas.Arellanes@mdlf.org
    01/31/2006 03:35 PM
    Please respond to campsite-dev


    To: campsite-dev@campware.org
    cc:
    Subject: [campsite-dev] article attachment file name/url discrepancy



    Hi,

    Is it me, or is there a discrepancy between the article attachment's file
    name and what its URL is when downloaded?

    What I've noticed is that a file's original name is lost when it's
    uploaded, and what shows up as its url is something like:

    http:///attachment/000000003.pdf

    Wouldn't it make more sense to keep the original file name as it is?


    doug

    =============================================
    Media Development Loan Fund
    =============================================
    Douglas Arellanes
    Head of Research and Development
    Center for Advanced Media--Prague (CAMP)
    Na vinicnich horach 24a/1834, 160 00 Prague 6
    Czech Republic
    Tel: + 420 2 3333 5356, Fax: +420 2 2431 5419
    Mobile: +420 724 073 364
    http://www.mdlf-camp.net
    http://www.campware.org
    =============================================
    http://www.mdlf.org
    =============================================
  • The reason the attachment file name is changed is so that attachments
    with the same file name can be uploaded to the same directory. We store
    the original file name and then give it to the browser when you
    download, so you get the same file name back as the one you uploaded.

    E.g. you upload "my_pic.gif", it gets stored as "000000005.gif", and
    when you download, it will be saved as "my_pic.gif". On top of that,
    you can upload multiple files named "my_pic.gif" and everything will be
    just fine.

    - Paul


    Douglas.Arellanes@mdlf.org wrote:
    >
    > Hi,
    >
    > Is it me, or is there a discrepancy between the article attachment's
    > file name and what its URL is when downloaded?
    >
    > What I've noticed is that a file's original name is lost when it's
    > uploaded, and what shows up as its url is something like:
    >
    > http:///attachment/000000003.pdf
    >
    > Wouldn't it make more sense to keep the original file name as it is?
    >
    >
    > doug
    >
    > =============================================
    > Media Development Loan Fund
    > =============================================
    > Douglas Arellanes
    > Head of Research and Development
    > Center for Advanced Media--Prague (CAMP)
    > Na vinicnich horach 24a/1834, 160 00 Prague 6
    > Czech Republic
    > Tel: + 420 2 3333 5356, Fax: +420 2 2431 5419
    > Mobile: +420 724 073 364
    > http://www.mdlf-camp.net
    > http://www.campware.org
    > =============================================
    > http://www.mdlf.org
    > =============================================
  • Please give me access to your site so I can debug...

    Douglas.Arellanes@mdlf.org wrote:
    Another discrepancy I've found may be due to bad templating, so take it with a grain of salt:

    This snippet of template code:









    returns this URI: http:///attachment/0000000-1.

    Which is incorrect.

    The template snippet below it, which should be referring to the same article, returns a different (correct) URI:


    ATTACHMENTS


    The following files are available for download:



    : KB ()






    The output of the directive below is:

    http:///attachment/000000003.pdf


    My question is, is this my own (admittedly) bad templating, or is this a bug?


    doug




    =============================================
    Media Development Loan Fund
    =============================================
    Douglas Arellanes
    Head of Research and Development
    Center for Advanced Media--Prague (CAMP)
    Na vinicnich horach 24a/1834, 160 00 Prague 6
    Czech Republic
    Tel: + 420 2 3333 5356, Fax: +420 2 2431 5419
    Mobile: +420 724 073 364
    http://www.mdlf-camp.net
    http://www.campware.org
    =============================================
    http://www.mdlf.org
    =============================================



    Douglas.Arellanes@mdlf.org 01/31/2006 03:35 PM
    Please respond to campsite-dev


    To: campsite-dev@campware.org
    cc:
    Subject: [campsite-dev] article attachment file name/url discrepancy



    Hi,

    Is it me, or is there a discrepancy between the article attachment's file name and what its URL is when downloaded?

    What I've noticed is that a file's original name is lost when it's uploaded, and what shows up as its url is something like:

    http:///attachment/000000003.pdf

    Wouldn't it make more sense to keep the original file name as it is?


    doug

    =============================================
    Media Development Loan Fund
    =============================================
    Douglas Arellanes
    Head of Research and Development
    Center for Advanced Media--Prague (CAMP)
    Na vinicnich horach 24a/1834, 160 00 Prague 6
    Czech Republic
    Tel: + 420 2 3333 5356, Fax: +420 2 2431 5419
    Mobile: +420 724 073 364
    http://www.mdlf-camp.net
    http://www.campware.org
    =============================================
    http://www.mdlf.org
    =============================================





    ---------------------------------
    Bring words and photos together (easily) with
    PhotoMail - it's free and works with Yahoo! Mail.